<?php
namespace ZN\Database\DB\Traits;

trait VariableTypesTrait
{
	//----------------------------------------------------------------------------------------------------
	//
	// Yazar      : Ozan UYKUN <ozanbote@windowslive.com> | <ozanbote@gmail.com>
	// Site       : www.zntr.net
	// Lisans     : The MIT License
	// Telif Hakkı: Copyright (c) 2012-2016, zntr.net
	//
	//----------------------------------------------------------------------------------------------------
	
	//----------------------------------------------------------------------------------------------------
	// Variable Types Methods Başlangıç
	//----------------------------------------------------------------------------------------------------

	/******************************************************************************************
	* VAR TYPE                                                                                *
	*******************************************************************************************
	| Genel Kullanım: Değişken türünü ve uzunluğunu belirtmek için kullanılır.				  |
	
	  @var numeric $len
	  
	  @return INT
	|          																				  |
	******************************************************************************************/
	public function vartype($type = '', $len = '', $output = true)
	{
		return $this->db->variableTypes($type, $len, $output);
	}
	
	/******************************************************************************************
	* INT                                                                                     *
	*******************************************************************************************
	| Genel Kullanım: SQL INT kullanımının karşılığıdır.									  |
	
	  @var numeric $len
	  
	  @return INT
	|          																				  |
	******************************************************************************************/
	public function int($len = '', $type = true)
	{
		return $this->db->variableTypes(__FUNCTION__, $len, $type);
	}
	
	/******************************************************************************************
	* INTEGER                                                                                 *
	*******************************************************************************************
	| Genel Kullanım: SQL INT kullanımının karşılığıdır.									  |
	
	  @var numeric $len
	  
	  @return INT
	|          																				  |
	******************************************************************************************/
	public function integer($len = '', $type = true)
	{
		return $this->db->variableTypes('int', $len, $type);
	}
	
	/******************************************************************************************
	* SMALLINT                                                                                *
	*******************************************************************************************
	| Genel Kullanım: SQL SMALLINT kullanımının karşılığıdır.								  |
	
	  @var numeric $len
	  
	  @return SMALLINT
	|          																				  |
	******************************************************************************************/
	public function smallInt($len = '', $type = true)
	{
		return $this->db->variableTypes(__FUNCTION__, $len, $type);
	}
	
	/******************************************************************************************
	* TINYINT                                                                                 *
	*******************************************************************************************
	| Genel Kullanım: SQL TINYINT kullanımının karşılığıdır.								  |
	
	  @var numeric $len
	  
	  @return TINYINT
	|          																				  |
	******************************************************************************************/
	public function tinyInt($len = '', $type = true)
	{
		return $this->db->variableTypes(__FUNCTION__, $len, $type);
	}
	
	/******************************************************************************************
	* MEDIUMINT                                                                               *
	*******************************************************************************************
	| Genel Kullanım: SQL MEDIUMINT kullanımının karşılığıdır.								  |
	
	  @var numeric $len
	  
	  @return MEDIUMINT
	|          																				  |
	******************************************************************************************/
	public function mediumInt($len = '', $type = true)
	{
		return $this->db->variableTypes(__FUNCTION__, $len, $type);
	}
	
	/******************************************************************************************
	* BIGINT                                                                                  *
	*******************************************************************************************
	| Genel Kullanım: SQL BIGINT kullanımının karşılığıdır.	     							  |
	
	  @var numeric $len
	  
	  @return BIGINT
	|          																				  |
	******************************************************************************************/
	public function bigInt($len = '', $type = true)
	{
		return $this->db->variableTypes(__FUNCTION__, $len, $type);
	}
	
	/******************************************************************************************
	* DECIMAL                                                                                 *
	*******************************************************************************************
	| Genel Kullanım: SQL DECIMAL kullanımının karşılığıdır.	  							  |
	
	  @var numeric $len
	  
	  @return DECIMAL
	|          																				  |
	******************************************************************************************/
	public function decimal($len = '', $type = true)
	{
		return $this->db->variableTypes(__FUNCTION__, $len, $type);
	}
	
	/******************************************************************************************
	* DOUBLE                                                                                  *
	*******************************************************************************************
	| Genel Kullanım: SQL DOUBLE kullanımının karşılığıdır.	  	     						  |
	
	  @var numeric $len
	  
	  @return DOUBLE
	|          																				  |
	******************************************************************************************/
	public function double($len = '', $type = true)
	{
		return $this->db->variableTypes(__FUNCTION__, $len, $type);
	}
	
	/******************************************************************************************
	* FLOAT                                                                                   *
	*******************************************************************************************
	| Genel Kullanım: SQL FLOAT kullanımının karşılığıdır.	  	     						  |
	
	  @var numeric $len
	  
	  @return FLOAT
	|          																				  |
	******************************************************************************************/
	public function float($len = '', $type = true)
	{
		return $this->db->variableTypes(__FUNCTION__, $len, $type);
	}
	
	/******************************************************************************************
	* CHAR                                                                                    *
	*******************************************************************************************
	| Genel Kullanım: SQL CHAR kullanımının karşılığıdır.	  	     						  |
	
	  @var numeric $len
	  
	  @return CHAR
	|          																				  |
	******************************************************************************************/
	public function char($len = '', $type = true)
	{
		return $this->db->variableTypes(__FUNCTION__, $len, $type);
	}
	
	/******************************************************************************************
	* VARCHAR                                                                                 *
	*******************************************************************************************
	| Genel Kullanım: SQL VARCHAR kullanımının karşılığıdır. 	     						  |
	
	  @var numeric $len
	  
	  @return VARCHAR
	|          																				  |
	******************************************************************************************/
	public function varChar($len = '', $type = true)
	{
		return $this->db->variableTypes(__FUNCTION__, $len, $type);
	}
	
	/******************************************************************************************
	* TINYTEXT                                                                                *
	*******************************************************************************************
	| Genel Kullanım: SQL TINYTEXT kullanımının karşılığıdır. 	     						  |
	
	  @return TINYTEXT
	|          																				  |
	******************************************************************************************/
	public function tinyText()
	{
		return $this->db->variableTypes(__FUNCTION__);
	}
	
	/******************************************************************************************
	* TEXT                                                                                    *
	*******************************************************************************************
	| Genel Kullanım: SQL TEXT kullanımının karşılığıdır. 	         						  |
	
	  @return TEXT
	|          																				  |
	******************************************************************************************/
	public function text()
	{
		return $this->db->variableTypes(__FUNCTION__);
	}
	
	/******************************************************************************************
	* MEDIUMTEXT                                                                              *
	*******************************************************************************************
	| Genel Kullanım: SQL MEDIUMTEXT kullanımının karşılığıdır. 	   						  |
	
	  @return MEDIUMTEXT
	|          																				  |
	******************************************************************************************/
	public function mediumText()
	{
		return $this->db->variableTypes(__FUNCTION__);
	}
	
	/******************************************************************************************
	* LONGTEXT                                                                                *
	*******************************************************************************************
	| Genel Kullanım: SQL LONGTEXT kullanımının karşılığıdır. 	     						  |
	
	  @return LONGTEXT
	|          																				  |
	******************************************************************************************/
	public function longText()
	{
		return $this->db->variableTypes(__FUNCTION__);
	}
	
	/******************************************************************************************
	* DATE                                                                                    *
	*******************************************************************************************
	| Genel Kullanım: SQL DATE kullanımının karşılığıdır. 	         						  |
	
	  @var numeric $len
	  
	  @return DATE
	|          																				  |
	******************************************************************************************/
	public function date($len = '', $type = true)
	{
		return $this->db->variableTypes(__FUNCTION__, $len, $type);
	}
	
	/******************************************************************************************
	* DATETIME                                                                                *
	*******************************************************************************************
	| Genel Kullanım: SQL DATETIME kullanımının karşılığıdır. 	       						  |
	
	  @var numeric $len
	  
	  @return DATETIME
	|          																				  |
	******************************************************************************************/
	public function dateTime($len = '', $type = true)
	{
		return $this->db->variableTypes(__FUNCTION__, $len, $type);
	}
	
	/******************************************************************************************
	* TIME                                                                                    *
	*******************************************************************************************
	| Genel Kullanım: SQL TIME kullanımının karşılığıdır.    	       						  |
	
	  @var numeric $len
	  
	  @return TIME
	|          																				  |
	******************************************************************************************/
	public function time($len = '', $type = true)
	{
		return $this->db->variableTypes(__FUNCTION__, $len, $type);
	}
	
	/******************************************************************************************
	* TIMESTAMP                                                                               *
	*******************************************************************************************
	| Genel Kullanım: SQL TIMESTAMP kullanımının karşılığıdır.    	  						  |
	
	  @var numeric $len
	  
	  @return TIMESTAMP
	|          																				  |
	******************************************************************************************/
	public function timeStamp($len = '', $type = true)
	{
		return $this->db->variableTypes(__FUNCTION__, $len, $type);
	}
}